<?php
namespace app\model\admin;

use think\Db;

class Login
{
    //后台登录
    public function admin_login($name,$password)
    {
        $where['name'] = $name;
        $where['password'] = $password;
        $user_info = Db::name('admin')->field('id,name,powers,status')->where($where)->find();
        return $user_info;
    }

    //后台登录日志
    public function admin_login_log($data)
    {
        $status = Db::name('admin_login_log')->insert($data);;
        return $status;
    }


}


